import axios from '@/libs/axios1'
let jsonHeaders = { 'content-type': 'application/json;charset=UTF-8' }
let base = '/testplatform/vulnerabilityTarget'

// 查询公用漏洞靶标
export const queryVulnerabilityTargetList = params => {
  return axios({
    url: `${base}/page`,
    method: 'GET',
    params,
    headers: jsonHeaders,
  })
}

// 创建公用漏洞靶标
export const addVulnerabilityTarget = data => {
  return axios({
    url: `${base}/add`,
    method: 'POST',
    data,
    headers: jsonHeaders,
  })
}

// 修改公用漏洞靶标
export const updateVulnerabilityTarget = data => {
  return axios({
    url: `${base}/update`,
    method: 'PUT',
    data,
    headers: jsonHeaders,
  })
}

// 删除公用漏洞靶标
export const deleteVulnerabilityTarget = data => {
  return axios({
    url: `${base}/delete`,
    method: 'DELETE',
    data,
    headers: jsonHeaders,
  })
}